/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
 */

#ifndef MCU_LOG_H
#define MCU_LOG_H
#include <stdint.h>
#include "hlink_log_api.h"

#define HLINK_LOG_MODULE_NUM_MAX        3
#define HLINK_LOG_FUNCNAME_LEN          64
#define HLINK_LOG_BUFF_LEN              512
#define HLINK_CACHE_LOG_BUFF_SIZE       (((uint32_t)0x1000)*8)

typedef enum {
    HLINK_LOG_UPLOAD_OFF = 0,
    HLINK_LOG_UPLOAD_ON,
} hlink_log_upload_switch;
	
typedef enum {
	HLINK_UPLOAD_GATEWAY = 0, // device to gateway
	HLINK_UPLOAD_APP, // device to telephone app
	HLINK_UPLOAD_MAX
} hlink_log_upload_direction;

typedef struct hlink_log_postion  {
    char func_name[HLINK_LOG_FUNCNAME_LEN];
    int32_t line_number;
    uint32_t repeat_times;
} hlink_log_postion_info;

typedef struct hlink_log_infoid  {
    uint32_t mid;                            // module id
    uint32_t flash;                          // write log to flash flag
    uint32_t upload;                         // upload log to APP or gateway
    hlink_log_level level;                   // log level
    char mid_name[HLINK_MID_STRING_LEN + 1]; // mid_name
} hlink_log_infoid_para;


#endif /* MCU_LOG_H */
